import type { DictType } from '@/components/DictTag';
import type { TableColumns, SearchConfig } from '@/components/TablePro';

// 任务状态
export const taskStatusOptions: DictType[] = [
	{ value: 0, label: '待添加档案', color: 'blue' },
	{ value: 1, label: '待分配', color: 'blue' },
	{ value: 2, label: '待发布', color: 'blue' },
	{ value: 3, label: '鉴定中', color: 'yellow' },
	{ value: 4, label: '待审核', color: 'yellow' },
	{ value: 5, label: '审核中', color: 'yellow' },
	{ value: 6, label: '鉴定完成', color: 'green' },
	{ value: 7, label: '审核不通过', color: 'error' }
];

// 鉴定类型
export const taskTypeOptions: DictType[] = [
	{ value: 0, label: '开放鉴定', color: 'blue' },
	{ value: 1, label: '价值鉴定', color: 'green' },
	{ value: 2, label: '销毁鉴定', color: 'cyan' },
	{ value: 3, label: '延期保管鉴定', color: 'gold' }
];

export const searchConfig: SearchConfig = [
	{ component: 'Input', name: 'title', label: '标题' },
	{ component: 'DateRangePicker', name: 'createTime', label: '日期' },
	{
		component: 'Select',
		name: 'status',
		label: '状态',
		enum: taskStatusOptions
	},
	{
		component: 'Select',
		name: 'taskType',
		label: '鉴定类型',
		enum: taskTypeOptions
	},
	{ component: 'Input', name: 'title', label: '标题' },
	{ component: 'Input', name: 'origin', label: '来源' },
	{
		component: 'Select',
		name: 'status',
		label: '状态',
		enum: taskStatusOptions
	},
	{
		component: 'Select',
		name: 'taskType',
		label: '鉴定类型',
		enum: taskTypeOptions
	},
	{ component: 'Input', name: 'title', label: '标题' },
	{ component: 'Input', name: 'origin', label: '来源' },
	{
		component: 'Select',
		name: 'status',
		label: '状态',
		enum: taskStatusOptions
	},
	{
		component: 'Select',
		name: 'taskType',
		label: '鉴定类型',
		enum: taskTypeOptions
	}
];

export const tableColumn: TableColumns = [
	{ title: '鉴定任务标题', key: 'name', dataIndex: 'name' },
	{ title: '来源', key: 'origin', dataIndex: 'origin' },
	{ title: '鉴定类型', key: 'taskType', dataIndex: 'taskType' },
	{ title: '状态', key: 'status', dataIndex: 'status' },
	{ title: '创建时间', key: 'createdTime', dataIndex: 'createdTime' },
	{ title: '操作', key: 'handler', align: 'center' }
];
